/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#include "ColorPacked.h"
#include <stdio.h>

namespace liba
{

const ColorPacked::Table ColorPacked::alpha_table;

ColorPacked::Table::Table()
{
	for( int alp = 0; alp < 256; ++alp )
		for( int val = 0; val < 256; ++val )
		{
			float result = 0.49f + val*alp/255.0f;
			data[alp][val] = (result > 255) ? 255 : (unsigned char)result;
		}
}

} //namespace liba